<%@ page contentType="text/html;charset=utf-8" %>
<%@ page language="java" import="weibo4j.http.*" %>
<%@ page language="java" import="weibo4j.*" %>
<jsp:useBean id="weboauth" scope="session" class="weibo4j.examples.WebOAuth" />
<%
AccessToken accessToken = (AccessToken)session.getAttribute("accessToken");
String weiboText=new String(request.getParameter("weiboText").getBytes("iso-8859-1"), "utf-8");
// 连续发表同样的微博内容会返回400错误
weboauth.update(accessToken, weiboText);
out.println("微博发表成功！");
%> 